﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.Windows.Forms;
using System.Text;

using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Data.SqlClient;  

public partial class GraduateDetails : System.Web.UI.Page
{
    SqlConnection conn;
    protected void Page_Load(object sender, EventArgs e)
    {
        conn = new SqlConnection(ConfigurationManager.ConnectionStrings["graduate_manageConnectionString2"].ConnectionString);  
        if (!IsPostBack)  
        {  
            try
            {
                conn.Open();
                SqlCommand comm = new SqlCommand("select * from INFO_GRADUATE where GRA_ID='" + Session["id"] + "'", conn);
                SqlDataAdapter adapter = new SqlDataAdapter(comm);
                DataSet ds = new DataSet();
                adapter.Fill(ds);
                DetailsView1.DataSource = ds.Tables[0].DefaultView;
                DetailsView1.DataBind();

            }
            catch (Exception ee)
            {
                MessageBox.Show("有错误发生，错误信息： " + ee.Message.ToString());
            }
            finally
            {
                conn.Close();
            }
        }
    }
}